home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1994 …ember: Reference Library / Dev.CD Dec 94.toast / What's New? / Sample Code / Snippets Update / Simple Imagecompressor ƒ / OffscreenShell.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-10-21  |  1.1 KB  |  58 lines  |  [TEXT/KAHL]

  1. #ifndef _OFFSCREENSHELL_H_
  2. #define _OFFSCREENSHELL_H_
  3.  
  4. /* Constant Declarations */
  5. #define    WWIDTH        470
  6. #define    WHEIGHT        330
  7.  
  8. #define WLEFT        (((screenBits.bounds.right - screenBits.bounds.left) - WWIDTH) / 2)
  9. #define WTOP        (((screenBits.bounds.bottom - screenBits.bounds.top) - WHEIGHT) / 2)
  10.  
  11. #define HiWrd(aLong)    (((aLong) >> 16) & 0xFFFF)
  12. #define LoWrd(aLong)    ((aLong) & 0xFFFF)
  13.  
  14.  
  15.  
  16. enum {
  17.     mApple = 128,
  18.     mFile,
  19.     mPalette
  20. } ;
  21.  
  22. enum {
  23.     iAbout = 1
  24. } ;
  25. enum {
  26.     iOpen = 1,
  27.     iClose,
  28.     iUnused1,
  29.     iSave = 4,
  30.     iUnused2,
  31.     iQuit = 6
  32. } ;
  33.  
  34. enum {
  35.     iUsePictPalette = 1
  36. } ;
  37.  
  38. static Boolean gQuitFlag = false ;
  39. static Point gStaggerPos = {50,50} ;
  40. static Boolean gUsePictPalette = true ;
  41.  
  42. // function prototypes
  43.  
  44. void InitToolbox( void ) ;
  45. void MainEventLoop( void ) ;
  46. void HandleKeyPress(EventRecord *event) ;
  47. void HandleOSEvent(EventRecord *event) ;
  48. void HandleMenuCommand(long menuResult) ;
  49. PicHandle DoReadPICT( short theRef, OSErr *theErr ) ;
  50. OSErr DoCreateWindow( PicHandle thePicture ) ;
  51. void AdjustMenus( void ) ;
  52.  
  53.  
  54. const RGBColor    kRGBBlack = {0, 0, 0};
  55. const RGBColor    kRGBWhite = {0xFFFF, 0xFFFF, 0xFFFF};
  56.  
  57.  
  58. #endif